/*
 * 	syscall.h:
 */

#ifndef FTRACE_SYSCALL_H
#define FTRACE_SYSCALL_H

#include <unistd.h>


/**
 * Get syscall code from traced process.
 * Should be called when process is stopped upon syscall entry.
 */
int syscall_get_code(pid_t pid);


/**
 * Get syscall return value.
 * Should be called when process is stopped upon syscall exit.
 */
int syscall_get_return_value(pid_t pid);


/**
 * Get syscall desplay name for its SYS_xxx code.
 */
const char* syscall_name(int code);


int syscall_get_word_argument(pid_t pid);


/**
 * Read syscall NULL-terminated string argument.
 */
std::string syscall_get_string_argument(pid_t pid);



#endif

